#include "adalog/appender/AsyncRollFileAppender.h"
#include "adalog/appender/RollFileAppender.h"

namespace adalog
{
    AsyncRollFileAppender::AsyncRollFileAppender(const std::filesystem::path& file_path, size_t max_size)
        : roll_file_appender_(std::make_shared<RollFileAppender>(file_path, max_size))
        , async_proxy_({roll_file_appender_})
    {
    }

    void AsyncRollFileAppender::Append(const char* data, size_t len)
    {
        async_proxy_.Append(data, len);
    }
} // namespace adalog